Software Engineering Notes in One Page

What is Software Engineering?

Software Engineering: The application of a systematic, quantifiable, and disciplined approach to the development, operation, and maintenance of software.

Software Development Cycles

Software Development Life Cycle:

  1. Requirements Engineering
  2. Design
  3. Implementation (Writing Code)
  4. Verification (Testing)
  5. Maintenance.

Waterfall

Waterfall Model:

Incremental

Incremental Model:

Evolutional

Evolutionary Models

Formal Methods

Formal Methods

AGILE

AGILE

AGILE: An evolutionary software development process

Optimal Conditions for Application of AGILE:

Extreme Programming (XP)

Extreme Programming:

SCRUM

SCRUM:

Requirements Engineering

Requirements Engineering: The part of the process where requirements are defined.

  1. Requirements Elicitation:
  2. Requirements Specification:
  3. Requirements Validation: Stakeholders approve the plan.
  4. Requirements Maintenance

Data Modeling

System Design

Structural Partitioning

Design is partitioned along data and functional boundaries.

Modularity

Components should be separate and have well-defined boundaries

Low-Coupling

Different modules have minimal amount of dependencies

High Cohesion

The stuff inside the modules should be interacting with each other as much as possible.

SOLID Principles

SOLID: A set of software design principles that are about building scalable and maintainable software.

  1. Single Responsibility Principle:
  2. Open for Extension, Closed for Modification:
  3. Liskov Substitution Principle:
  4. Interface Segregation Principle:
  5. Dependency Inversion Principle:
// 1: Depending on concretions
private List list;
public ListUser(List l) {
    list = new ArrayList();
}

// 2: Delay the instantiation of the list
// - This inverts the dependency back onto the client code.
// - This is used a lot in user interfaces because of how extensible it is.
private List list;
public ListUser(List l) {
    this.list = l;
}

Design Patterns

Design Patterns: A set of patterns that should be applied to a list of problems that often arise in software engineering. There are 4 categories.

Creation Patterns

  1. Creation Patterns

Factory Method

Factory Method:

Abstract Factory

Abstract Factory: Delegate objection creation completely into another class.

public interface ListManager {
    public List createList();
}

public class C {
    ListManager l;
    // use an implementation of ListManager here
}

Dependency Injection

Dependency Injection: Decouple layers by injecting dependencies through function argument injection. Concrete types are injected at object creation.

Prototype

Prototype: Have a prototypical object represent particular kinds of objects in your system, and every time you need a new object you clone the prototype.

Object Pool

Object Pool: Front-load the allocation of objects.

Builder

Builder: Used to abstract the construction of a complex object.

Structural/Behavior Patterns

  1. The these patterns, the problem is architecture.

Decorators Pattern: (Structural)

Dynamically add functionality o a component by wrapping the core component with another component that adds the extra functionality.

Command Pattern: (Behavior Pattern)

Decouple data from behavior by abstraction actions into a command interface.

Example:

public class Student {
    
}

interface StudentCommand {
    execute()
}

class AvgGpaCommand implements StudentCommand {
    @override
    public float execute() {
        // implementation
    }
}

class CommandProc {
    Table commands
    executeCommand(String comm) {
        commands.get(comm.execute());
    }
    executeAll() {
    }
    addCommand(StudentCommand, String name)

Adapter Pattern: (Structural)

Pattern that allows changing one interface into another one, by wrapping the adapter.

Iterator Pattern: (Behavior)

Pattern used on collections.

public interface Iterator<E> {
    E next();
    boolean hasNext();
}

Visitor Pattern: (Behavior)

Pattern used to implement the function applied to every element at a particular structure as it’s traversed.